package com.hsnn.medstgmini.trading.pur.model;

public enum OrderDetailStatus {

	submit(1, "已提交"), confirmed(2, "已确认"), dispatched(3, "已配送"), decline(4,
			"拒绝配送"), arrival(5, "已完成"), nonArrival(6, "未到货"),shortDrug(13,"缺货");

	private int key;
	private String value;

	private OrderDetailStatus(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (OrderDetailStatus ot : OrderDetailStatus.values()) {
			if (ot.key == key) {
				return ot.value;
			}
		}
		return "";
	}

	public static OrderDetailStatus getOrderType(int key) {
		for (OrderDetailStatus ot : OrderDetailStatus.values()) {
			if (ot.key == key) {
				return ot;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
